<nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">积分商城后台管理</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
              {% if g.user %}
            <li><a href="#">欢迎,{{ g.user.nickname }}</a></li>
              {% endif %}
            <li><a href="#">设置</a></li>
            <li><a href="#">个人信息</a></li>
            <li><a href="{{ url_for('logout') }}">退出登录</a></li>
          </ul>
          <form class="navbar-form navbar-right" action="{{ url_for('product_list', page=1) }}">
            <input type="text" name="name" class="form-control" placeholder="输入商品名称">
              <input type="submit" value="搜索">
          </form>
        </div>
      </div>
    </nav>